/**
 * \file CodeProfile_Win32.cpp
 * \brief CodeProfile definition class for windows
 * \author Edouard ROGE
 * \date 16 October 2012
 */

#include <Windows.h>
#include "Profiler.h"
#include "CodeProfile.h"


namespace Core
{
	namespace Profile
	{
		CodeProfile::CodeProfile(const char * _name, uint32 _parentThreadId)
		{
			m_iIndexTimeMeasure = Profiler::GetInstance().StartNewTimeMeasure(_name, GetCurrentThreadId(), _parentThreadId);
		}

		CodeProfile::~CodeProfile()
		{
			Profiler::GetInstance().StopTimeMeasure(m_iIndexTimeMeasure, GetCurrentThreadId());
		}
	}
}